import request from '@/utils/request'

export const LineSectionVersionApi = {
    /**
     *  线路组分页列表
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/getPage',
            data,
            method: 'post'
        })
    },
    /**
     *  更新状态
     * @returns
     */
    updateStatus: (data) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/updateStatus',
            data,
            method: 'post'
        })
    },
    /**
     *  删除
     * @returns
     */
    delete: (lineSectionVersionId) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/delete',
            params: {lineSectionVersionId},
            method: 'get'
        })
    },

    /**
     *  获取详细信息
     * @returns
     */
    getInfoById: (lineSectionVersionId) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/getInfoById',
            params: {lineSectionVersionId},
            method: 'get'
        })
    },

    /**
     *  更新
     * @returns
     */
    update: (data) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/update',
            data,
            method: 'post'
        })
    },

    /**
     *  添加
     * @returns
     */
    insert: (data) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/insert',
            data,
            method: 'post'
        })
    },

    /**
     *  获取详细信息
     * @returns
     */
    updateLineSectionConfigCache: (lineGroupId) => {
        return request({
            url: '/manage/intercity/lineSectionVersion/updateLineSectionConfigCache',
            params: {lineGroupId},
            method: 'get'
        })
    },
}
